import 'package:gluz/generated/json/base/json_field.dart';
import 'package:gluz/generated/json/shop_cart_entity.g.dart';
import 'dart:convert';
export 'package:gluz/generated/json/shop_cart_entity.g.dart';

@JsonSerializable()
class ShopCartEntity {
	String id = '';
	String userId = '';
	String productId = '';
	String productName = '';
	String productImage = '';
	String productImageUrl = '';
	int quantity = 0;
	int unitPrice = 0;
	int totalPrice = 0;
	String productSku = '';
	String productAttributes = '';
	bool isSelected = false;
	String merchantId = '';
	String merchantName = '';
	String createdTime = '';
	String updatedTime = '';
	int deleted = 0;
	bool isIncludePosdCost = false; // 是否包含运费

	ShopCartEntity();

	factory ShopCartEntity.fromJson(Map<String, dynamic> json) => $ShopCartEntityFromJson(json);

	Map<String, dynamic> toJson() => $ShopCartEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}